﻿@model _1._6._2015_EntityFramework.Models.IndexViewModel
@{
    ViewBag.Title = "Home Page";
}

<div class="jumbotron">
    <h1>ASP.NET</h1>
    <p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
    <p><a href="http://asp.net" class="btn btn-primary btn-lg">Learn more &raquo;</a></p>
</div>

<div class="row">
    <div class="col-md-4">
        <ul>
            @foreach (var order in Model.Orders)
            {
                <li>
                    Name: @order.Name, Order Date: @order.OrderDate, Total: @order.Total
                    <table class="table table-bordered table-striped">
                        <tr>
                            <th>Product Description</th>
                            <th>Price</th>
                        </tr>
                        @foreach (var orderItem in order.OrderItems)
                        {
                            <tr>
                                <td>@orderItem.ItemDescription</td>
                                <td>@orderItem.Price</td>
                            </tr>
                        }
                    </table>

                </li>
            }
        </ul>
    </div>
</div>